﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using LoginModule;
namespace HDVN5.WebServices
{
    /// <summary>
    /// Summary description for BasicAccount
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    [System.Web.Script.Services.ScriptService]
    public class BasicAccount : System.Web.Services.WebService
    {

        [WebMethod]
        [System.Web.Script.Services.ScriptMethod(UseHttpGet = true, ResponseFormat = System.Web.Script.Services.ResponseFormat.Json)]
        public int kiemTraTaiKhoan(string value)
        {
            return LoginModule.CongCu.KiemTraTinhHopLe.xacNhanTaiKhoanTonTai(value);
        }
        [WebMethod]
        public string dangNhapTaiKhoan(string taikhoan, string matkhau)
        {
            matkhau = Utilites.Encrypt(taikhoan, true,taikhoan);

            LoginModule.DangKy kiemTraTaiKhoan = new LoginModule.DangKy();

            return kiemTraTaiKhoan.dangNhapTaiKhoan(taikhoan, matkhau);
        }
    }
}
